Skip to content

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#6

Merged
johnteee merged 1 commit into
mainfrom
alert-autofix-5
May 14, 2026
Merged

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#6
johnteee merged 1 commit into
mainfrom
alert-autofix-5

Conversation

@johnteee
Copy link
Copy Markdown
Member

Potential fix for https://github.com/TeaEntityLab/teaAgent/security/code-scanning/5

Best fix: keep behavior (validation + user-facing errors) but remove dynamic sensitive content from error strings returned by _load_key_ring, so line 27 can safely print generic errors.

In teaagent/cli/_handlers/_mcp.py, update _load_key_ring error messages that currently include {path}, {exc}, {kid!r}, or {active_kid!r} to static/sanitized text. This addresses both variants because error at line 27 will no longer carry tainted sensitive data. No functional flow changes are needed; only message content changes.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@johnteee johnteee marked this pull request as ready for review May 14, 2026 10:44
@johnteee johnteee merged commit 056a38f into main May 14, 2026
12 of 17 checks passed
@johnteee johnteee deleted the alert-autofix-5 branch May 14, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant